package com.ruoyi.agent.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 主机运行Agent对象 kw_machine_agent
 * 
 * @author gonianer
 * @date 2023-11-20
 */
public class KwMachineAgent extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 主机ID，FK to kw_machine_info.id */
    @Excel(name = "主机ID，FK to kw_machine_info.id")
    private Long machineId;

    /** Agent安装版本，通常是RPM包版本号 */
    @Excel(name = "Agent安装版本，通常是RPM包版本号")
    private String version;

    /** Agent安装目录 */
    @Excel(name = "Agent安装目录")
    private String installHome;

    /** Agent日志目录 */
    @Excel(name = "Agent日志目录")
    private String logHome;

    /** 进程ID */
    @Excel(name = "进程ID")
    private Long pid;

    /** 操作系统用户名 */
    @Excel(name = "操作系统用户名")
    private String username;

    /** 命令参数 */
    @Excel(name = "命令参数")
    private String commandArgs;

    /** 开放端口号 */
    @Excel(name = "开放端口号")
    private String port;

    /** 进程已运行时间（秒） */
    @Excel(name = "进程已运行时间", readConverterExp = "秒=")
    private Long upTime;

    /** 最近存活时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近存活时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastActiveTime;

    /** HTTP BASIC认证用户 */
    @Excel(name = "HTTP BASIC认证用户")
    private String httpUser;

    /** HTTP BASIC认证密码 */
    @Excel(name = "HTTP BASIC认证密码")
    private String httpPasswd;

    /** agent状态： AVAILABLE, RESTARTING, STOPPING, REINSTALLING, OFFLINE, DELETED */
    @Excel(name = "agent状态： AVAILABLE, RESTARTING, STOPPING, REINSTALLING, OFFLINE, DELETED")
    private String status;

    /** 软件包唯一id */
    @Excel(name = "软件包唯一id")
    private Long softwarePackageId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setMachineId(Long machineId) 
    {
        this.machineId = machineId;
    }

    public Long getMachineId() 
    {
        return machineId;
    }
    public void setVersion(String version) 
    {
        this.version = version;
    }

    public String getVersion() 
    {
        return version;
    }
    public void setInstallHome(String installHome) 
    {
        this.installHome = installHome;
    }

    public String getInstallHome() 
    {
        return installHome;
    }
    public void setLogHome(String logHome) 
    {
        this.logHome = logHome;
    }

    public String getLogHome() 
    {
        return logHome;
    }
    public void setPid(Long pid) 
    {
        this.pid = pid;
    }

    public Long getPid() 
    {
        return pid;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setCommandArgs(String commandArgs) 
    {
        this.commandArgs = commandArgs;
    }

    public String getCommandArgs() 
    {
        return commandArgs;
    }
    public void setPort(String port) 
    {
        this.port = port;
    }

    public String getPort() 
    {
        return port;
    }
    public void setUpTime(Long upTime) 
    {
        this.upTime = upTime;
    }

    public Long getUpTime() 
    {
        return upTime;
    }
    public void setLastActiveTime(Date lastActiveTime) 
    {
        this.lastActiveTime = lastActiveTime;
    }

    public Date getLastActiveTime() 
    {
        return lastActiveTime;
    }
    public void setHttpUser(String httpUser) 
    {
        this.httpUser = httpUser;
    }

    public String getHttpUser() 
    {
        return httpUser;
    }
    public void setHttpPasswd(String httpPasswd) 
    {
        this.httpPasswd = httpPasswd;
    }

    public String getHttpPasswd() 
    {
        return httpPasswd;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setSoftwarePackageId(Long softwarePackageId) 
    {
        this.softwarePackageId = softwarePackageId;
    }

    public Long getSoftwarePackageId() 
    {
        return softwarePackageId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("machineId", getMachineId())
            .append("version", getVersion())
            .append("installHome", getInstallHome())
            .append("logHome", getLogHome())
            .append("pid", getPid())
            .append("username", getUsername())
            .append("commandArgs", getCommandArgs())
            .append("port", getPort())
            .append("upTime", getUpTime())
            .append("lastActiveTime", getLastActiveTime())
            .append("httpUser", getHttpUser())
            .append("httpPasswd", getHttpPasswd())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("status", getStatus())
            .append("softwarePackageId", getSoftwarePackageId())
            .toString();
    }
}
